﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="~/css/framework-font.css" rel="stylesheet" />
    <link href="~/css/framework-theme.css" rel="stylesheet" />
    <script src="~/lib/jquery/1.12.4/jquery.min.js"></script>
    <script src="~/lib/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <link href="~/lib/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
    <script src="~/lib/wdtree/tree.js"></script>
    <link href="~/lib/wdtree/tree.css" rel="stylesheet" />
    <link href="~/lib/select2/select2.min.css" rel="stylesheet" />
    <script src="~/lib/select2/select2.min.js"></script>
    <script src="~/lib/laydate/laydate.js"></script>
    <script src="~/lib/moment/moment.js"></script>
    <link href="~/lib/wizard/wizard.css" rel="stylesheet" />
    <script src="~/lib/wizard/wizard.js"></script>
    <script src="~/lib/validate/jquery.validate.min.js"></script>
    <script src="~/lib/datepicker/WdatePicker.js"></script>
    <script src="~/lib/jqgrid/5.3.0/i18n/grid.locale-cn.js"></script>
    <link href="~/css/framework-ui.css" rel="stylesheet" />
    <script src="~/js/framework-ui.js"></script>
</head>
<body>

    <script src="/lib/qrcode/jquery.qrcode.js"></script>
    <script src="/lib/qrcode/qrcode.js"></script>
    <script>
    $(function () {
        $('#qrcodeTable').qrcode({
            render: "table",
            text: "http://www.nfine.cn",
            width: "265",
            height: "265"
        });
    });
    function createqrcode() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $("#qrcodeTable").html("");
        $('#qrcodeTable').qrcode({
            render: "table",
            text: $("#txt_barcod").val(),
            width: "265",
            height: "265"
        });
    }
    </script>
    <form id="form1">
        <div class="mail-box">
            <div class="mail-header">生成二维码</div>
            <div class="mail-body">
                <table class="form">
                    <tr>
                        <th class="formTitle">二维码内容</th>
                        <td class="formValue">
                            <div class="input-group">
                                <input id="txt_barcod" name="txt_barcod" type="text" class="form-control required" placeholder="请输入要生成二维码的字符串">
                                <span class="input-group-btn">
                                    <a onclick="createqrcode()" class="btn  btn-primary" style="padding-left:10px;padding-right:10px;font-size:12px;line-height: 20px;">生成</a>
                                </span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle" valign="top" style="padding-top:25px;">二维码图像</th>
                        <td class="formValue" style="padding-top:20px;">
                            <div id="qrcodeTable"></div>
                            <div style="color: #aaaaaa;margin-top:10px;">使用微信扫一扫</div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</body>
</html>

